import { useRouter } from 'vue-router'

const router = useRouter()

function jump(url: string) {
  router.push(url)
}

interface openOption {
  self?: boolean
}

function open(url: string, config?: openOption) {
  if (config!.self) {
    window.open(url, '__self')
  } else {
    window.open(url)
  }
}

export { jump, open }
